package com.chenfan.ccp.autoconfigure;

import com.chenfan.ccp.common.exception.BaseException;
import com.chenfan.ccp.common.exception.CommonExceptionHandler;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @className: GlobalExceptionAutoConfigure
 * @description: TODO 类描述
 * @author: Leo
 * @date: 2021/1/29 3:37 下午
 **/
@Configuration
@ConditionalOnClass(BaseException.class)
public class GlobalExceptionHandlerConfigure extends AbstractAutoConfigure{

    @Bean
    public CommonExceptionHandler exceptionHandler() {
        return new CommonExceptionHandler();
    }
}
